using System;

namespace InfiniteGeek.Util
{
	/// <summary>Declares to AutoConfig that a ConfigSection should be loaded as a <see cref="System.Collections.Specialized.NameValueCollection"/> into the decorated property.</summary>
	[AttributeUsage(AttributeTargets.Property)]
	public sealed class AutoConfigSectionPropertyAttribute : Attribute
	{
		/// <summary>The name of the configuration section that should be loaded into the decorated property.</summary>
		public String Name { get; private set; }

		/// <summary>Initializes a new instance of <see cref="AutoConfigSectionPropertyAttribute"/>.</summary>
		/// <param name="name">A string that specifies the configuration section associated with the decorated property. </param>
		public AutoConfigSectionPropertyAttribute(String name) { Name = name; }
	}
}